package com.ytjj.qmyx.admin.dao;

import com.ytjj.qmyx.admin.model.request.ActivityImgRequest;
import com.ytjj.qmyx.admin.model.request.ActivityRequest;
import com.ytjj.qmyx.admin.model.request.ActivitySpectRequest;
import com.ytjj.qmyx.admin.model.response.ProductActivityModelResponse;
import com.ytjj.qmyx.admin.model.response.ProductStockGroupResponse;
import com.ytjj.qmyx.admin.model.response.StockRemindResponse;
import com.ytjj.qmyx.mall.model.ProductActivity;
import com.ytjj.qmyx.mall.model.ProductActivityImg;
import com.ytjj.qmyx.mall.model.ProductActivitySpec;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface ProductActivityDao {

    List<ProductActivityModelResponse> activityList(ActivityRequest activityRequest);

    List<ProductActivitySpec> getActivitySpecsById(ActivitySpectRequest activitySpectRequest);

    List<ProductActivityImg> getActivityImgsById(ActivityImgRequest activityImgRequest);

    List<ProductStockGroupResponse> productStockGroup();

    int updateStock(Integer productId, Integer stockSum);

    int updatePriceStock(Integer productId, BigDecimal price, Integer stock);

    Integer isRecImgFlag(Integer productId);

    Integer updateRecImgFlag(@Param("productId") Integer productId, @Param("recImgFlag") Integer recImgFlag);

    Integer getProductActivityImg(Integer id);

    ProductActivity getProductActivityById(Integer id);

    List<ProductActivity> getProductActivityByProductId(Integer productId);

    int checkedProductActivity(Integer id);

    Integer updateProductInfo(ProductActivity productActivity);

    Integer insertProductImg(ProductActivityImg productActivityImg);

    Integer delProductActivityImg(@Param("productId") Integer productId, @Param("type") String type);

    Integer delProductActivitySpec(Integer productId);

    Integer delProductActivity(Integer id);

    List<StockRemindResponse> getStockInfo(Integer stock);

    List<ProductActivityModelResponse> syncList();

    Integer syncSpec(@Param("activityId") Integer activityId, @Param("curPrice") BigDecimal curPrice);

}

